<h4> Universe Selection </h4>
<p>
   We use the universe selection API to create a momentum portfolio. Our coarse-universe selection eliminates stocks with a price lower than $5 and ETFs which do not have fundamental data. Fine-universe selection chooses the 50 largest companies ranked by market capitalization.
</p>
<h4>Momentum Calculation</h4>
<p>
  Momentum is the absolute difference in stocks.
  \[Momentum = Close_{today}-Close_{N-days-ago}\]
<p>
  Dictionary <code>self.mom</code> is used to save the LEAN Momentum class instance <code>Momentum</code> for each symbol.
  In <code>OnSecuritiesChanged</code> event method, we add the newly selected symbol to the dictionary and initialize the momentum indicator with the history request. For symbols removed from the universe, we remove it from the dictionary and liquidate its positions. Each day in <code>OnData</code>, the Momentum indicator for all symbols in the dictionary will be updated with the latest closing price.
</p>
<p>
  We choose a period of 12 months for the momentum indicator. Stocks with the best 12-month momentum (12-month performance) are then added to our portfolio and are weighted equally.
</p>

<h4> Monthly Rebalance</h4>
<p>
  The portfolio is rebalanced once a month. The coarse and fine universe selection is set to default to run at midnight once a day. To make the universe selection run at the first trading day each month, we use the int variable <code>self.month</code> that tracks the current month to manage the universe selection. At the start of each month, the universe selection will filter new stocks. On all other days, the universe selection function will return <code>Universe.Unchanged</code>. In contrast to returning an empty list or a list of previously selected symbols, returning <code>Universe.Unchanged</code> is the best way for monthly rebalance universe selection. If there are no open positions for certain symbol, returning an empty list will stop the data subscription of that symbol and halt updates of the indicator.
</p>
